<?php
$this->Html->addCrumb('Documents');
?>
<h1 class="pageTitle">Documents</h1>

<div>
    <?php echo $this->Html->image('documentsImg.png', array("alt"=>'Documents', "class"=>"right"))?>
<?php
  if(isset($documents) && !empty($documents)) {
    echo '<ul>';
    foreach ($documents as $document) {
      echo '<li>'.$this->Html->link($document['Document']['title'],'/'.$document['Document']['file_path'], array('title'=>'Document for download', 'target'=>'new')).'</li>';
    }
    echo '</ul>';
    echo $this->element('main_pagination');
  } else {
    echo '<p>No documents are currently available for download.</p>';
  }
?>
</div>